package com.xxx.borrow.ui.loan.window;

import android.content.Context;
import android.view.View;

import com.xxx.borrow.R;
import com.xxx.borrow.base.activity.BaseActivity;
import com.xxx.borrow.base.dialog.BaseDialog;
import com.xxx.borrow.ui.wallet.window.PasswordWindow;

import butterknife.BindView;
import butterknife.OnClick;

public class LoanPopStatus extends BaseDialog {

    private Callback callback;
    private BaseActivity activity;

    public static LoanPopStatus getInstance(BaseActivity context) {
        return new LoanPopStatus(context);
    }

    private LoanPopStatus(BaseActivity context) {
        super(context);
        this.activity = context;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.loan_pop_1;
    }

    @Override
    protected void initData() {
        setCancelable(true);
    }

    @OnClick({R.id.window_password_return,R.id.window_loan_btn})
    public void OnClick(View view) {
        switch (view.getId()) {
            case R.id.window_password_return:
                dismiss();
                break;
            case R.id.window_loan_btn:
                if (callback != null) callback.callback();
                break;
        }
    }

    @Override
    protected double setWidth() {
        return 0.8;
    }

    public interface Callback {
        void callback();
    }

    public void setCallback(Callback callback) {
        this.callback = callback;
    }
}
